package cn.fintecher.pangolin.service.dataimp.scheduled;

import cn.fintecher.pangolin.service.dataimp.repository.PrincipalRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Auther: xiaqun
 * @Description:
 * @Date: 17:08 2019/8/29
 */

@Component
@EnableScheduling
public class BatchSeqScheduled {
    private static final Logger log = LoggerFactory.getLogger(BatchSeqScheduled.class);

    @Autowired
    private PrincipalRepository principalRepository;

    @Scheduled(cron = "0 0 0 * * ?")
    private void downloadRecord() {
        log.info("重置序列号开始");
        principalRepository.reset();
    }
}
